DescribeSecurityGroups
Description
call DescribeSecurityGroups to query the basic information of the security group you created.
Request Method
POST
Request Path
/apsara/route/Ecs/DescribeSecurityGroups
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Tag.N.key | BODY | string | No | null | the tag key of the security group. Description To improve compatibility, we recommend that you use the Tag.N.Key parameter as much as possible. |
Tag.N.Key | BODY | string | No | TestKey | the tag key of the security group. The value range of n is 1~20. |
PageSize | BODY | integer | No | 10 | the number of rows per page set during paging query. Maximum value: 50. default value: 10. |
ResourceGroupId | BODY | string | No | rg-bp67acfmxazb4p**** | the ID of the enterprise resource group where the security group is located. |
SecurityGroupName | BODY | string | No | SGTestName | security group name. |
SecurityGroupId | BODY | string | No | sg-bp67acfmxazb4p**** | security group ID. |
DryRun | BODY | boolean | No | false | whether to precheck only this request. Value range: true: sends a check request and does not query the resource status. Check items include whether the AccessKey is valid, the authorization status of RAM users, and whether required parameters are filled in. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation will be returned. false: sends a normal request, returns a 2XX HTTP status code after checking, and directly queries the resource status. default value: false. |
SecurityGroupIds | BODY | string | No | ["sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****",...] | security group ID list. Up to 100 security group IDs are supported at a time. The IDs are separated by commas (,) in the JSON format. |
version | BODY | string | No | 2016-01-01 | version of api |
Tag.N.value | BODY | string | No | null | the tag value of the security group. description to improve compatibility, it is recommended that you try to use the Tag.N.Value parameter. |
VpcId | BODY | string | No | vpc-bp67acfmxazb4p**** | the vpc network ID where the security group is located. |
PageNumber | BODY | integer | No | 1 | the page number of the security group list. starting value: 1. default value: 1. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Tag.N.Value | BODY | string | No | TestValue | the tag value of the security group. The value range of n is 1~20. |
NetworkType | BODY | string | No | vpc | the network type of the security group. Value range: vpc classic |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | region ID. You can call the DescribeRegions to view the latest Alibaba Cloud region list. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}